Skip to content

feat: show seconds in web display and Excel when UseOneMinuteIntervals on (Phase 4)#1543

Merged
renemadsen merged 1 commit into
stablefrom
feat/use-one-minute-intervals-phase-4-web-display-excel
May 2, 2026
Merged

feat: show seconds in web display and Excel when UseOneMinuteIntervals on (Phase 4)#1543
renemadsen merged 1 commit into
stablefrom
feat/use-one-minute-intervals-phase-4-web-display-excel

Conversation

@renemadsen
Copy link
Copy Markdown
Member

Summary

Phase 4 of the UseOneMinuteIntervals second-precision rollout — web admin display + Excel export. Phases 0/1/2 are merged on stable; Phase 3 (mobile) is in flight on flutter-time PR #460.

When a row's AssignedSite.UseOneMinuteIntervals is on:

  • Excel export's GetShiftTime returns HH:mm:ss strings sourced from Start1StartedAt etc. instead of the legacy 5-min Options[] lookup. Pause columns have no single representative stamp so they fall through to the 2-arg path (acceptable per plan).
  • The web-admin plannings table displays actual-stamp cells via a new formatStamp(row, value) helper that picks HH:mm:ss based on the row's per-site flag.
  • The day-edit dialog's six ngx-material-timepicker [minutesGap] bindings shift from 5 to 1 (minute-precision input; sub-minute input deferred per Q2(c)).
  • New sibling helpers convertHoursToTimeWithSeconds / getStopTimeDisplayWithSeconds; existing padZero / convertHoursToTime / getStopTimeDisplay stay untouched.

Behavior with the flag off is byte-identical to before — every code path either delegates to the existing 2-arg method or short-circuits when actualStamp is null.

Locked decisions:

  • Q2 = (c) Defer sub-minute INPUT on web admin; only DISPLAY shows seconds.
  • Q3 = default — payroll CSV (DataLon/DanLon) stays at F2 decimal hours, out of scope for Phase 4.

Test plan

  • dotnet clean && dotnet build at host root — green (0 errors, 129 warnings unchanged from baseline)
  • New jest unit tests on formatStamp, getStopTimeDisplayWithSeconds, convertHoursToTimeWithSeconds (time-plannings-table.component.spec.ts) — assert HH:mm:ss vs HH:mm based on row.useOneMinuteIntervals.
  • New C# carve-out tests in PlanRegistrationHelperTests.cs for GetShiftTime overload (intent captured for future fixture work, mirrors Phase 0/1/2 carve-out pattern) — covers flag-on 07:03:53 vs flag-off 07:00.
  • New C# carve-out test for Excel GenerateExcelDashboard shift-cell formatting (intent captured; format-helper unit test covers the contract).
  • New playwright e2e in dashboard-edit-multishift.spec.ts — currently test.skip with a TODO for fixture seeding of AssignedSite.UseOneMinuteIntervals=true + precise Start1StartedAt. Format-helper jest test covers the merge-blocking contract.
  • CI green
  • Existing flag-off paths exercised by all pre-existing tests pass unchanged

…uteIntervals on (Phase 4)

Phase 4 of the UseOneMinuteIntervals second-precision rollout.
When a row's AssignedSite has the flag on:
- Excel export's GetShiftTime returns HH:mm:ss strings sourced
  from Start1StartedAt etc. instead of the 5-min Options lookup
- The web-admin plannings table displays actual-stamp cells via
  a new formatStamp(row, field) helper that picks 'HH:mm:ss'
- The day-edit dialog's six time-pickers shift their minutesGap
  from 5 to 1 (minute-precision input; sub-minute input deferred
  per Q2(c))
- The padZero/displayTimeFormat angular helpers gain a sibling
  that includes :SS; the original helpers stay untouched.

Behavior with the flag off is byte-identical to before. Excel
export path falls through to the legacy 5-min Options[] lookup
when actualStamp is null OR flag off.

Plan: /home/rene/.claude/plans/parallel-twirling-balloon.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@renemadsen renemadsen merged commit 2b29921 into stable May 2, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant